enum ActivityType {
  GROUP_BUYING__1 = "group_buying__1", // 团购(第一型态)
  CHECK_IN__1 = "check_in__1", // 签到(第一型态)
  LOTTERY__1 = "lottery__1", // 抽奖(第一型态)
}

export const isActivityType = (val: any): val is ActivityType => {
  return [
    ActivityType.GROUP_BUYING__1,
    ActivityType.CHECK_IN__1,
    ActivityType.LOTTERY__1,
  ].includes(val);
};

export const checkIsAsFeature = (val: any): val is ActivityType => {
  return [
    ActivityType.CHECK_IN__1,
  ].includes(val);
};

export const checkCanEndorse = (val: any): val is ActivityType => {
  return [
    ActivityType.GROUP_BUYING__1,
  ].includes(val);
}

export const checkNeedTypeInfo = (val: any): val is ActivityType => {
  return [
    ActivityType.CHECK_IN__1,
    ActivityType.LOTTERY__1,
  ].includes(val);
};

export default ActivityType;
